package com.yl.chainStore.entity.pay

import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import com.yl.common.annotation.NoArg
import com.yl.common.getContext

/**
 * <p>
 * 部门收费项目私有设置，库存也放这里
 * </p>
 *
 * @author cxw
 * @since 2021-06-08
 */
@NoArg
@TableName("pay_company_dept_item")
data class PayCompanyDeptItem(

	/**
	 * id
	 */
	@TableId(value = "id", type = IdType.AUTO)
	var id: Long = 0L,

	/**
	 * 物品id
	 */
	@TableField(value = "item_id")
	var itemId: Long,

	/**
	 * 物品名称
	 */
	@TableField(exist = false)
	var goodName: String? = null,

	/**
	 * 类型
	 */
	@TableField(exist = false)
	var typeId: Long? = null,

	/**
	 * 类型名称
	 */
	@TableField(exist = false)
	var typeName: String? = null,

	/**
	 * 规格
	 */
	@TableField(exist = false)
	var specification: String? = null,

	/**
	 * 单位
	 */
	@TableField(exist = false)
	var unit: String? = null,

	@TableField(exist = false)
	var brand: String? = null,

	/**
	 * 昵称
	 */
	@TableField("nickname")
	var nickname: String? = null,

	/**
	 * 部门（仓库id）
	 */
	@TableField("dept_id")
	var deptId: Long,

	/**
	 * 数量
	 */
	@TableField("count")
	var count: Int = 0,

	/**
	 * 预警数量
	 */
	@TableField("warning_count")
	var warningCount: Int = -1,

	/**
	 * 公司id
	 */
	@TableField("company_id")
	var companyId: Long = getContext().companyId,

	/**
	 * 是否高价
	 */
	@TableField("high_price")
	var highPrice: Int = 0,

	/**
	 * 是否启用
	 */
	@TableField("use_status")
	var useStatus: Int = 1,

	/**
	 * 是否预警
	 */
	@TableField("warning_status")
	var warningStatus: Int = 0,


	@TableField(exist = false)
	var sumMoney: Long? = null,

	/**
	 * 建议出售价格
	 */
	@TableField("recommend_price")
	var recommendPrice : Long?=null,

	/**
	 * 是否能出售超过自己的库存中的数量
	 */
	@TableField("can_sell_more_warehouse")
	var canSellMoreWarehouse:Int = 1,

	/**
	 * 总价值
	 */
	@TableField("warehouse_sum_money")
	var warehouseSumMoney:Long = 0,

	/**
	 * 总价值
	 */
	@TableField("show_label")
	var showLabel:String = ""

)
